﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Store_Keeper : System.Web.UI.MasterPage
{

    List<string> proid = new List<string>();

    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["user"] == null)
        {
            Response.Redirect("index.aspx");
        }


        if (Session["user"] == null)
        {
            Response.Redirect("index.aspx");
        }


        Label2.Text = Session["current"].ToString();
        if (Session["user"] != null)
        {
            Label1.Text = Session["username"].ToString();

            if (!this.IsPostBack)
            {
                proid = Bestlife.ERP.BusinessRules.B_Stock.checkstock();


                foreach (string ListItem in proid)
                {
                    ASPxMemo1.Visible = true;
                    ASPxMemo1.Text += " " + ListItem + "  is Out of Stock\n";



                    //    // ASPxMemo2.Text=" "+ proname +" is Out of Stock";

                }
            }
        }

        else
        {
            Label1.Text = "Guest";
        }
    }
}
